package com.zjwd.system.service.impl;

import com.zjwd.system.domain.SysLogOperate;
import com.zjwd.system.mapper.SysLogOperateMapper;
import com.zjwd.system.service.ISysLogOperateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 操作日志 服务层处理
 *
 * @author liquan
 */
@Service
public class SysLogOperateServiceImpl implements ISysLogOperateService {

    @Autowired
    private SysLogOperateMapper logMapper;

    /**
     * 新增操作日志
     *
     * @param log 操作日志对象
     */
    @Override
    public void insert(SysLogOperate log) {
        logMapper.insert(log);
    }

    /**
     * 查询系统操作日志集合
     *
     * @param log 操作日志对象
     * @return 操作日志集合
     */
    @Override
    public List<SysLogOperate> selectList(SysLogOperate log) {
        return logMapper.selectList(log);
    }

    /**
     * 批量删除系统操作日志
     *
     * @param ids 需要删除的操作日志ID
     * @return 结果
     */
    @Override
    public int deleteByIds(Long[] ids) {
        return logMapper.deleteByIds(ids);
    }

    /**
     * 查询操作日志详细
     *
     * @param id 操作ID
     * @return 操作日志对象
     */
    @Override
    public SysLogOperate selectLogById(Long id) {
        return logMapper.selectLogById(id);
    }

    /**
     * 清空操作日志
     */
    @Override
    public void clean() {
        logMapper.clean();
    }
}
